<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
<title>source\jindo.UploadQueue.js - Jindo Component - AjaxUI@NHN</title>
<link rel="stylesheet" type="text/css" href="../assets/prettify/prettify-min.css" media="screen">
<script type="text/javascript">
	var isMobile = (function() {
		var r = window.devicePixelRatio || 1;
		if (/windows phone/i.test(navigator.userAgent)) { r = 2; }
		
		var s = Math.max(screen.width / r, screen.height / r);
		
		var m = s < 1024;
		var href = m ? "api.mobile.css" : "api.css";
		document.write('<link rel="stylesheet" type="text/css" href="../assets/' + href + '" media="screen">');
		
		return m;
	})();
</script>

<script type="text/javascript" src="../assets/jindo.desktop.min.js"></script>
<script type="text/javascript" src="../assets/jindo_component.min.js"></script>
</head>
<body class="api-page">
<div id="wrap" class="api-main"><!-- 2Depth 접기 : lft_fold 추가 -->

	<div id="header">
		<h1><a href="../index.html"><span class="blind">JindoJS</span></a></h1>
		<div class="info">
			<span class="version">version 1.6.0</span>
			<span class="bar">|</span>
			<span class="help"><span class="ic_help"></span><a href="http://devcode.nhncorp.com/projects/jindo-component/issue" target="_blank">버그신고/문의</a></span>
		</div>
		<div class="menu">
			<button type="button" id="toggle_search_btn" class="btn_sch"><span class="blind">검색</span></button>
			<button type="button" id="toggle_list_btn" class="btn_snb btn_snb_on"><span class="blind">메뉴</span></button>
			<!-- [D] 클릭시 btn_sch_on,btn_snb_on 추가 -->
		</div>
	</div>

	<!-- sch_frm -->
	<div class="sch_frm hide_when_small">
		<h2 class="blind">검색</h2>
		<div class="filter">
			<input type="search" id="api-filter" placeholder="검색어를 입력하세요.">
		</div>
		<div id="search-tab" style="display:none;">
			<ul class="tabs">
			<li class="tc-tab">전체</li>
			<li class="tc-tab">키워드</li>
			<li class="tc-tab">클래스</li>
			<li class="tc-tab">메서드</li>
			<li class="tc-tab">프로퍼티</li>
			<li class="tc-tab">이벤트</li>
			</ul>
			<div class="panels">
				<ul id="api-all" class="tc-panel"></ul>
				<ul id="api-keywords" class="tc-panel"></ul>
				<ul id="api-classes" class="tc-panel"></ul>
				<ul id="api-methods" class="tc-panel"></ul>
				<ul id="api-attrs" class="tc-panel"></ul>
				<ul id="api-events" class="tc-panel"></ul>
			</div>

		</div>
	</div>
	<!-- // sch_frm -->

	<!-- container -->
	<div id="container">
		<!-- left-columns -->
		<div id="left-columns" class="sidemenu has_scrollbar">
			<h2 class="blind"><a href="../index.html"><span>APIs</span></a></h2>
<div class="snb depth1 scrollbar hide_when_small">
	<!-- [D] style="width:135px; height:384px; -->
	<div class="scrollbar-box">
		<div class="scrollbar-content">
			<div><ul>
			            <li class="">
			            	<a href="../classes/jindo.Accordion.html" class="">
			                	Accordion
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.AjaxHistory.html" class="">
			                	AjaxHistory
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.BrowseButton.html" class="">
			                	BrowseButton
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Cache.html" class="">
			                	Cache
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Calendar.html" class="">
			                	Calendar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Canvas.html" class="">
			                	Canvas
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CheckBox.html" class="">
			                	CheckBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CircularRolling.html" class="">
			                	CircularRolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Clipboard.html" class="">
			                	Clipboard
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Component.html" class="">
			                	Component
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DataBridge.html" class="">
			                	DataBridge
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DatePicker.html" class="">
			                	DatePicker
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DefaultTextValue.html" class="">
			                	DefaultTextValue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Dialog.html" class="">
			                	Dialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DragArea.html" class="">
			                	DragArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DropArea.html" class="">
			                	DropArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DynamicTree.html" class="">
			                	DynamicTree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Effect.html" class="">
			                	Effect
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FileUploader.html" class="">
			                	FileUploader
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FloatingLayer.html" class="">
			                	FloatingLayer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Foggy.html" class="">
			                	Foggy
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Formatter.html" class="">
			                	Formatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.HTMLComponent.html" class="">
			                	HTMLComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.InlineTextEdit.html" class="">
			                	InlineTextEdit
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerEffect.html" class="">
			                	LayerEffect
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerManager.html" class="">
			                	LayerManager
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerPosition.html" class="">
			                	LayerPosition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LazyLoading.html" class="">
			                	LazyLoading
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ModalDialog.html" class="">
			                	ModalDialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MouseGesture.html" class="">
			                	MouseGesture
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MultipleAjaxRequest.html" class="">
			                	MultipleAjaxRequest
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumberFormatter.html" class="">
			                	NumberFormatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumericStepper.html" class="">
			                	NumericStepper
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Pagination.html" class="">
			                	Pagination
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Rolling.html" class="">
			                	Rolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RollingChart.html" class="">
			                	RollingChart
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverArea.html" class="">
			                	RolloverArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverClick.html" class="">
			                	RolloverClick
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBar.html" class="">
			                	ScrollBar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBox.html" class="">
			                	ScrollBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectArea.html" class="">
			                	SelectArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectBox.html" class="">
			                	SelectBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Slider.html" class="">
			                	Slider
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.StarRating.html" class="">
			                	StarRating
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TabControl.html" class="">
			                	TabControl
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TextRange.html" class="">
			                	TextRange
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Timer.html" class="">
			                	Timer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Transition.html" class="">
			                	Transition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Tree.html" class="">
			                	Tree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UIComponent.html" class="">
			                	UIComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UploadQueue.html" class="">
			                	UploadQueue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.WatchInput.html" class="">
			                	WatchInput
								
								

							    
						        
			            	</a>
			            </li>
			        </ul></div>
		</div>
	</div>
	<div class="scrollbar-v">
		<div class="scrollbar-button-up"></div>
		<div class="scrollbar-track">
			<div class="scrollbar-thumb" style="top: 0px; height: 222px; "></div>
		</div>
		<div class="scrollbar-button-down"></div>
	</div>
</div>


<button type="button" title="펼치기" class="btn_open">바로가기 열기<span class="ic"></span></button>
<button type="button" title="접기" class="btn_close">바로가기 닫기<span class="ic"></span></button>

		</div>
		<!-- // left-columns -->

		<!-- main content -->
		<div id="main">
			<div class="main_fix">
				<div class="content">
	
	<h1 class="blind">source/jindo.UploadQueue.js</h1>
	<div class="tc-panel first">
		<dl class="relation">
			<dt>파일명</dt>
			<dd>jindo.UploadQueue.js</dd>
			<dt>경로</dt>
			<dd>source/</dd>
		</dl>
		<div id="file" class="file">
		    <pre class="code prettyprint linenums">/**
	HTML5&nbsp;의&nbsp;FileAPI&nbsp;와&nbsp;Flash&nbsp;를&nbsp;사용해서&nbsp;다중&nbsp;파일&nbsp;업로드를&nbsp;구현하는&nbsp;컴포넌트

	@author&nbsp;hooriza
	@version&nbsp;#__VERSION__#
	
	@class&nbsp;jindo.UploadQueue
	@extends&nbsp;jindo.Component
	@uses&nbsp;jindo.BrowseButton
	
	@keyword&nbsp;upload,&nbsp;플래시,&nbsp;flash,&nbsp;업로드,&nbsp;HTML5,&nbsp;FileAPI
**/

jindo.UploadQueue&nbsp;=&nbsp;jindo.$Class({
	
	_states&nbsp;:&nbsp;{
		NONE&nbsp;:&nbsp;&#39;NONE&#39;,
		WAIT&nbsp;:&nbsp;&#39;WAIT&#39;,
		PROGRESS&nbsp;:&nbsp;&#39;PROGRESS&#39;,
		LOAD&nbsp;:&nbsp;&#39;LOAD&#39;,
		ERROR&nbsp;:&nbsp;&nbsp;&#39;ERROR&#39;
	},
	
	_callbackForFlash&nbsp;:&nbsp;{
		
		&#39;buttonOver&#39;&nbsp;:&nbsp;function()&nbsp;{
			this.fireEvent(&#39;buttonOver&#39;);
		},
		
		&#39;buttonOut&#39;&nbsp;:&nbsp;function()&nbsp;{
			this.fireEvent(&#39;buttonOut&#39;);
		},
		
		&#39;selectFile&#39;&nbsp;:&nbsp;function(aFiles)&nbsp;{
			this._addQueue(aFiles);
		},
		
		&#39;selectFileError&#39;&nbsp;:&nbsp;function(sMessage)&nbsp;{
			/**
			&nbsp;*&nbsp;잘못&nbsp;된&nbsp;파일을&nbsp;선택&nbsp;했을&nbsp;때&nbsp;발생한다.
			&nbsp;*&nbsp;플래시&nbsp;업로드에서&nbsp;4기가&nbsp;이상의&nbsp;파일의&nbsp;선택하는&nbsp;등의&nbsp;이유로&nbsp;발생&nbsp;할&nbsp;수&nbsp;있다.&nbsp;&nbsp;
			&nbsp;*&nbsp;@event&nbsp;selectError
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sMessage&nbsp;에러&nbsp;메시지
			&nbsp;*/
			this.fireEvent(&#39;selectError&#39;,&nbsp;{&nbsp;&#39;sMessage&#39;&nbsp;:&nbsp;sMessage&nbsp;});
		},
		
		&#39;start&#39;&nbsp;:&nbsp;function(oObj)&nbsp;{
			
		},
		
		&#39;progress&#39;&nbsp;:&nbsp;function(oObj)&nbsp;{
			var&nbsp;sKey&nbsp;=&nbsp;oObj.sKey;
			var&nbsp;oFile&nbsp;=&nbsp;this._getFileObj(sKey,&nbsp;oObj.oFile);
			if&nbsp;(oFile.state&nbsp;!==&nbsp;this._states.PROGRESS)&nbsp;{&nbsp;return;&nbsp;}
			this.fireEvent(&#39;uploadProgress&#39;,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;sKey&nbsp;});
		},
		
		&#39;load&#39;&nbsp;:&nbsp;function(oObj)&nbsp;{
			
			var&nbsp;sKey&nbsp;=&nbsp;oObj.sKey;
			var&nbsp;oFile&nbsp;=&nbsp;this._getFileObj(sKey,&nbsp;oObj.oFile);
			var&nbsp;sResponseText&nbsp;=&nbsp;oObj.sResponse;
		
			this._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;uploadLoad&#39;,&nbsp;oFile.size,&nbsp;1,&nbsp;this._states.LOAD,&nbsp;sResponseText);
		},
		
		&#39;error&#39;&nbsp;:&nbsp;function(oObj)&nbsp;{
			this._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;uploadError&#39;,&nbsp;0,&nbsp;0,&nbsp;this._states.ERROR);
		}
		
	},
	
	_showFlashForFlash&nbsp;:&nbsp;function(welButton)&nbsp;{
		
		if&nbsp;(welButton)&nbsp;{
			
			var&nbsp;oOffset&nbsp;=&nbsp;welButton.offset();
			var&nbsp;elFlash&nbsp;=&nbsp;this._getFlash();
			
			this._elDummy.style.left&nbsp;=&nbsp;oOffset.left&nbsp;+&nbsp;&#39;px&#39;;&nbsp;
			this._elDummy.style.top&nbsp;=&nbsp;oOffset.top&nbsp;+&nbsp;&#39;px&#39;;
			
			this._elDummy.style.width&nbsp;=&nbsp;elFlash.style.width&nbsp;=&nbsp;welButton.width()&nbsp;+&nbsp;&#39;px&#39;;&nbsp;
			this._elDummy.style.height&nbsp;=&nbsp;elFlash.style.height&nbsp;=&nbsp;welButton.height()&nbsp;+&nbsp;&#39;px&#39;;&nbsp;
			
		}&nbsp;else&nbsp;{
			
			this._elDummy.style.left&nbsp;=&nbsp;this._elDummy.style.top&nbsp;=&nbsp;0;
			this._elDummy.style.width&nbsp;=&nbsp;this._elDummy.style.height&nbsp;=&nbsp;&#39;1px&#39;;	
			
		}
		
	},
	
	_createFlashForFlash&nbsp;:&nbsp;function(sUnique)&nbsp;{
		
		if&nbsp;(this._elDummy)&nbsp;{&nbsp;return;&nbsp;}
		
		var&nbsp;elDummy&nbsp;=&nbsp;this._elDummy&nbsp;=&nbsp;jindo.$(&#39;&lt;div&gt;&#39;);
		
		var&nbsp;sFlashUID&nbsp;=&nbsp;sUnique;
		var&nbsp;sFlashURL&nbsp;=&nbsp;this.option(&#39;sSwfPath&#39;);
		var&nbsp;oAgent&nbsp;=&nbsp;jindo.$Agent();
		
		elDummy.style.cssText&nbsp;=&nbsp;&#39;position:absolute&nbsp;!important;&nbsp;border:0&nbsp;!important;&nbsp;padding:0&nbsp;!important;&nbsp;margin:0&nbsp;!important;&nbsp;overflow:hidden&nbsp;!important;&nbsp;z-index:32001&nbsp;!important;&#39;;
		document.body.insertBefore(elDummy,&nbsp;document.body.firstChild);
		
		if(oAgent.flash().version&nbsp;&gt;=&nbsp;11&nbsp;&amp;&amp;&nbsp;oAgent.navigator().ie){
			sFlashURL&nbsp;+=&nbsp;&quot;?&quot;+Math.floor(Math.random()&nbsp;*&nbsp;10000);
		}
		
		var&nbsp;oFlashVars&nbsp;=&nbsp;{
			bMultiple&nbsp;:&nbsp;this.option(&#39;bMultiple&#39;),
			sJSFunctionName&nbsp;:&nbsp;&#39;jindo.UploadQueue.__flashCallback.&#39;&nbsp;+&nbsp;sUnique,
			nButtonOpacity&nbsp;:&nbsp;0,
			sParamName&nbsp;:&nbsp;this.option(&#39;sParamName&#39;),
			sURL&nbsp;:&nbsp;this._url&nbsp;//&nbsp;&quot;upload.php&quot;
		};
		
		var&nbsp;sFlashHtml&nbsp;=&nbsp;nhn.FlashObject.generateTag(sFlashURL,&nbsp;&#39;UPLOADQUEUE&#39;&nbsp;+&nbsp;sFlashUID,&nbsp;50,&nbsp;50,&nbsp;{flashVars&nbsp;:&nbsp;oFlashVars,&nbsp;wmode&nbsp;:&nbsp;&#39;transparent&#39;});&nbsp;//flashVars로&nbsp;sUniq&nbsp;전달
		
		sFlashHtml&nbsp;=&nbsp;sFlashHtml.replace(/style=&quot;position:relative&nbsp;!important;&quot;/gi,&nbsp;&#39;style=&quot;position:absolute&nbsp;!important;&nbsp;left:0&nbsp;!important;&nbsp;top:0&nbsp;!important;&nbsp;border:0&nbsp;!important;&nbsp;padding:0&nbsp;!important;&nbsp;margin:0&nbsp;!important;&nbsp;overflow:visible&nbsp;!important;&quot;&#39;);
		elDummy.innerHTML&nbsp;=&nbsp;sFlashHtml;
		
		//&nbsp;jindo.$Fn(this._checkFailed,&nbsp;this).attach(elDummy,&nbsp;&#39;click&#39;);
		
		this._showFlashForFlash(false);
		
		this._getFlash&nbsp;=&nbsp;function()&nbsp;{
			return&nbsp;nhn.FlashObject.find(&#39;UPLOADQUEUE&#39;&nbsp;+&nbsp;sFlashUID);			
		};
		
	},

	_sendForFlash&nbsp;:&nbsp;function(sFuncName,&nbsp;aArgs)&nbsp;{
		
		if&nbsp;(!this._getFlash)&nbsp;{&nbsp;return;&nbsp;}
		
		var&nbsp;oFlash&nbsp;=&nbsp;this._getFlash();
		oFlash[sFuncName].apply(oFlash,&nbsp;aArgs&nbsp;||&nbsp;[]);
		
	},
	
	/**
	&nbsp;*&nbsp;UploadQueue&nbsp;컴포넌트를&nbsp;생성한다.
	&nbsp;*&nbsp;@constructor
	&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sURL&nbsp;업로드&nbsp;될&nbsp;경로
	&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oOptions&nbsp;옵션&nbsp;객체
	&nbsp;*&nbsp;		@param&nbsp;{Element}&nbsp;oOptions.elButton&nbsp;찾아보기&nbsp;버튼으로&nbsp;사용&nbsp;할&nbsp;엘리먼트&nbsp;
	&nbsp;*&nbsp;		@param&nbsp;{Boolean}&nbsp;[oOptions.bMultiple=true]&nbsp;파일&nbsp;선택&nbsp;창에서&nbsp;여러개의&nbsp;파일을&nbsp;선택&nbsp;할&nbsp;수&nbsp;있도록&nbsp;할지&nbsp;여부&nbsp;(true&nbsp;:&nbsp;가능&nbsp;/&nbsp;false&nbsp;:&nbsp;불가능)
	&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;[oOptions.nParallel=1]&nbsp;동시에&nbsp;병렬로&nbsp;진행&nbsp;가능한&nbsp;업로드&nbsp;갯수
	&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;[oOptions.sParamName=&quot;file&quot;]&nbsp;서버로&nbsp;파일&nbsp;데이터를&nbsp;보낼&nbsp;때&nbsp;사용&nbsp;할&nbsp;이름
	&nbsp;*/
	$init&nbsp;:&nbsp;function(sURL,&nbsp;oOptions)&nbsp;{
		
		var&nbsp;bSupportHTML5&nbsp;=&nbsp;typeof&nbsp;FormData&nbsp;!==&nbsp;&#39;undefined&#39;;
		this._methodPostfix&nbsp;=&nbsp;bSupportHTML5&nbsp;?&nbsp;&#39;ForHTML5&#39;&nbsp;:&nbsp;&#39;ForFlash&#39;;
		
		this.getMethod&nbsp;=&nbsp;function()&nbsp;{
			return&nbsp;bSupportHTML5&nbsp;?&nbsp;&#39;HTML5&#39;&nbsp;:&nbsp;&#39;flash&#39;;
		};
		
		this.option({
			bMultiple&nbsp;:&nbsp;true,
			nParallel&nbsp;:&nbsp;1,
			sParamName&nbsp;:&nbsp;&#39;file&#39;
		});
		
		this.option(oOptions&nbsp;||&nbsp;{});
		
		this._url&nbsp;=&nbsp;sURL;
		this._queue&nbsp;=&nbsp;[];
		
		this._uploading&nbsp;=&nbsp;0;
		
		this._initialize();
		this._attachEvents();
		
	},
	
	////////////////////////////////////////////////////////////////////////////////////////////////////////
	_getFileObj&nbsp;:&nbsp;function(sKey,&nbsp;oNewFile)&nbsp;{
		var&nbsp;fp&nbsp;=&nbsp;this[&#39;_getFileObj&#39;&nbsp;+&nbsp;this._methodPostfix];
		return&nbsp;(this._getFileObj&nbsp;=&nbsp;fp).apply(this,&nbsp;arguments);
	},
	
		_getFileObjForHTML5&nbsp;:&nbsp;function(sKey,&nbsp;oNewFile)&nbsp;{
			return&nbsp;oNewFile;
		},
		
		_getFileObjForFlash&nbsp;:&nbsp;function(sKey,&nbsp;oNewFile)&nbsp;{
			
			var&nbsp;oFile&nbsp;=&nbsp;this._flashFiles[sKey];
			if&nbsp;(oFile&nbsp;&amp;&amp;&nbsp;oNewFile)&nbsp;{
				for&nbsp;(var&nbsp;k&nbsp;in&nbsp;oNewFile)&nbsp;if&nbsp;(oNewFile.hasOwnProperty(k))&nbsp;{
					oFile[k]&nbsp;=&nbsp;oNewFile[k];	
				}
			}
			
			return&nbsp;oFile;
			
		},
		
	//------------------------------------------------------------------------------------------------------

	_initialize&nbsp;:&nbsp;function()&nbsp;{
		var&nbsp;fp&nbsp;=&nbsp;this[&#39;_initialize&#39;&nbsp;+&nbsp;this._methodPostfix];
		return&nbsp;(this._initialize&nbsp;=&nbsp;fp).apply(this,&nbsp;arguments);
	},
	
		_initializeForHTML5&nbsp;:&nbsp;function(oOptions)&nbsp;{
			
			this._xhr&nbsp;=&nbsp;{};
			
			this._browseButton&nbsp;=&nbsp;new&nbsp;jindo.BrowseButton(this.option(&#39;elButton&#39;));
			this._browseButton.getFileSelect().multiple&nbsp;=&nbsp;this.option(&#39;bMultiple&#39;);
			
		},
		
		_initializeForFlash&nbsp;:&nbsp;function()&nbsp;{
			
			this._flashFiles&nbsp;=&nbsp;{};
			
		},

	//------------------------------------------------------------------------------------------------------

	_attachEvents&nbsp;:&nbsp;function()&nbsp;{
		var&nbsp;fp&nbsp;=&nbsp;this[&#39;_attachEvents&#39;&nbsp;+&nbsp;this._methodPostfix];
		return&nbsp;(this._attachEvents&nbsp;=&nbsp;fp).apply(this,&nbsp;arguments);
	},
	
		_attachEventsForHTML5&nbsp;:&nbsp;function()&nbsp;{
			
			var&nbsp;self&nbsp;=&nbsp;this;
			
			this._browseButton.attach({
				
				&#39;sourceChange&#39;&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
					self._addQueue(this.getFileSelect().files);
					this.getFileSelect().value&nbsp;=&nbsp;&#39;&#39;;
				},
				
				/**
				&nbsp;*&nbsp;파일&nbsp;찾기&nbsp;버튼&nbsp;안으로&nbsp;마우스가&nbsp;올라갔을때&nbsp;발생한다.
				&nbsp;*&nbsp;@event&nbsp;buttonOver
				&nbsp;*/
				&#39;over&#39;&nbsp;:&nbsp;function()&nbsp;{
					self.fireEvent(&#39;buttonOver&#39;);
				},
				
				/**
				&nbsp;*&nbsp;파일&nbsp;찾기&nbsp;버튼&nbsp;밖으로&nbsp;마우스가&nbsp;나갔을때&nbsp;발생한다.
				&nbsp;*&nbsp;@event&nbsp;buttonOut
				&nbsp;*/
				&#39;out&#39;&nbsp;:&nbsp;function()&nbsp;{
					self.fireEvent(&#39;buttonOut&#39;);
				}
				
			});
			
			var&nbsp;elDropArea&nbsp;=&nbsp;jindo.$(this.option(&#39;elDropArea&#39;));
			var&nbsp;bOver&nbsp;=&nbsp;false;
			
			var&nbsp;fpSetOver&nbsp;=&nbsp;function(oEvent,&nbsp;bFlag)&nbsp;{
				oEvent.stopDefault();
				if&nbsp;(bOver&nbsp;!==&nbsp;bFlag)&nbsp;{
					/**
					&nbsp;*&nbsp;드래그&nbsp;영역&nbsp;안으로&nbsp;마우스가&nbsp;올라갔을때&nbsp;발생한다.
					&nbsp;*&nbsp;@event&nbsp;dragOver
					&nbsp;*/
					/**
					&nbsp;*&nbsp;드래그&nbsp;영역&nbsp;밖으로&nbsp;마우스가&nbsp;나갔을때&nbsp;발생한다.
					&nbsp;*&nbsp;@event&nbsp;dragOut
					&nbsp;*/
					self.fireEvent(bFlag&nbsp;?&nbsp;&#39;dragOver&#39;&nbsp;:&nbsp;&#39;dragOut&#39;);
					bOver&nbsp;=&nbsp;bFlag;	
				}
			};
			
			if&nbsp;(elDropArea)&nbsp;{
				
				jindo.$Element(elDropArea).
				
					attach(&#39;dragenter&#39;,&nbsp;function(oEvent)&nbsp;{
						oEvent.stopDefault();
					}).
	
					attach(&#39;dragover&#39;,&nbsp;function(oEvent)&nbsp;{
						fpSetOver(oEvent,&nbsp;true);
					}).
	
					attach(&#39;dragleave&#39;,&nbsp;function(oEvent)&nbsp;{
						fpSetOver(oEvent,&nbsp;false);
					}).
	
					attach(&#39;drop&#39;,&nbsp;function(oEvent)&nbsp;{
						fpSetOver(oEvent,&nbsp;false);
						self._addQueue(oEvent.$value().dataTransfer.files);
					});
		
	&nbsp;&nbsp;&nbsp;&nbsp;	}
			
		},
			
		_attachEventsForFlash&nbsp;:&nbsp;function()&nbsp;{
			
			var&nbsp;self&nbsp;=&nbsp;this;
			var&nbsp;sUnique&nbsp;=&nbsp;&#39;UQ&#39;&nbsp;+&nbsp;new&nbsp;Date().getTime()&nbsp;+&nbsp;Math.floor(Math.random()&nbsp;*&nbsp;1000000);
			
			jindo.UploadQueue.__flashCallback[sUnique]&nbsp;=&nbsp;function(sFuncName,&nbsp;aArgs)&nbsp;{
	
				var&nbsp;fpFunc&nbsp;=&nbsp;self._callbackForFlash[sFuncName];
				fpFunc&nbsp;&amp;&amp;&nbsp;fpFunc.apply(self,&nbsp;aArgs&nbsp;||&nbsp;[]);
	
			};
			
			this._createFlashForFlash(sUnique);
			
			var&nbsp;welButton&nbsp;=&nbsp;jindo.$Element(this.option(&#39;elButton&#39;));
			
			jindo.$Fn(function(oEvent)&nbsp;{
				self._showFlashForFlash(welButton);
			}).attach(welButton,&nbsp;&#39;mousemove&#39;);
			
		},

	//------------------------------------------------------------------------------------------------------

	_uploadFile&nbsp;:&nbsp;function()&nbsp;{
		var&nbsp;fp&nbsp;=&nbsp;this[&#39;_uploadFile&#39;&nbsp;+&nbsp;this._methodPostfix];
		return&nbsp;(this._uploadFile&nbsp;=&nbsp;fp).apply(this,&nbsp;arguments);
	},
	
		_uploadFileForFlash&nbsp;:&nbsp;function(oProp)&nbsp;{
			
			var&nbsp;self&nbsp;=&nbsp;this;
	
			var&nbsp;oFile&nbsp;=&nbsp;oProp.file;
			var&nbsp;sKey&nbsp;=&nbsp;oProp.key;
			
			oFile.state&nbsp;=&nbsp;this._states.PROGRESS;
	
			this._uploading++;
			this._sendForFlash(&#39;upload&#39;,&nbsp;&nbsp;[&nbsp;[sKey]&nbsp;]);
	
		},
		
		_uploadFileForHTML5&nbsp;:&nbsp;function(oProp)&nbsp;{
			
			var&nbsp;self&nbsp;=&nbsp;this;
	
			var&nbsp;oFile&nbsp;=&nbsp;oProp.file;
			var&nbsp;sKey&nbsp;=&nbsp;oProp.key;
			
			oFile.state&nbsp;=&nbsp;this._states.PROGRESS;
	
			this._uploading++;
			
			var&nbsp;oXHR&nbsp;=&nbsp;new&nbsp;XMLHttpRequest(),
			oUpload&nbsp;=&nbsp;oXHR.upload;
			
			oUpload.addEventListener(&quot;progress&quot;,&nbsp;function&nbsp;(oEvent)&nbsp;{
				
				if&nbsp;(!oEvent.lengthComputable)&nbsp;{&nbsp;return;&nbsp;}
				if&nbsp;(!self._xhr[sKey])&nbsp;{&nbsp;return;&nbsp;}
					
				oFile.loaded&nbsp;=&nbsp;oEvent.loaded;
				oFile.rate&nbsp;=&nbsp;oEvent.loaded&nbsp;&amp;&amp;&nbsp;(oEvent.loaded&nbsp;/&nbsp;oFile.size);
				
				/**
				&nbsp;*&nbsp;파일의&nbsp;업로드가&nbsp;진행&nbsp;중일&nbsp;때&nbsp;발생한다.
				&nbsp;*&nbsp;
				&nbsp;*&nbsp;@event&nbsp;uploadProgress
				&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
				&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
				&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
				&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
				&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
				&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
				&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(PROGRESS)
				&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
				&nbsp;*/
				self.fireEvent(&#39;uploadProgress&#39;,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;sKey&nbsp;});
				
			},&nbsp;false);
			
			/**
			&nbsp;*&nbsp;파일의&nbsp;업로드가&nbsp;완료&nbsp;되었을&nbsp;때&nbsp;발생한다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@event&nbsp;uploadLoad
			&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(LOAD)
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
			&nbsp;*/
			oUpload.addEventListener(&quot;load&quot;,&nbsp;function&nbsp;()&nbsp;{
				
				var&nbsp;that&nbsp;=&nbsp;this;
				var&nbsp;func&nbsp;=&nbsp;arguments.callee;
				
				if&nbsp;(oXHR.readyState&nbsp;!==&nbsp;4)&nbsp;{
					setTimeout(function()&nbsp;{&nbsp;func.call(that);&nbsp;},&nbsp;0);
					return;
				}
				
				if&nbsp;(oXHR.status&nbsp;===&nbsp;200)&nbsp;{
					self._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;uploadLoad&#39;,&nbsp;oFile.size,&nbsp;1,&nbsp;self._states.LOAD,&nbsp;oXHR.responseText);
				}&nbsp;else&nbsp;{
					self._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;uploadError&#39;,&nbsp;0,&nbsp;0,&nbsp;self._states.ERROR);
				}
				
			},&nbsp;false);
			
			/**
			&nbsp;*&nbsp;파일을&nbsp;업로드&nbsp;하다가&nbsp;에러가&nbsp;났을&nbsp;때&nbsp;발생한다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@event&nbsp;uploadError
			&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(ERROR)
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
			&nbsp;*/
			oUpload.addEventListener(&quot;error&quot;,&nbsp;function&nbsp;()&nbsp;{
				self._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;uploadError&#39;,&nbsp;0,&nbsp;0,&nbsp;self._states.ERROR);
				
			},&nbsp;false);
			
			/**
			&nbsp;*&nbsp;파일의&nbsp;업로드를&nbsp;중단&nbsp;했을&nbsp;때&nbsp;발생한다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@event&nbsp;uploadAbort
			&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(NONE)
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
			&nbsp;*/
			oUpload.addEventListener(&quot;abort&quot;,&nbsp;function&nbsp;()&nbsp;{
				self._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;uploadAbort&#39;,&nbsp;0,&nbsp;0,&nbsp;self._states.NONE);
			},&nbsp;false);
			
			oXHR.open(&quot;POST&quot;,&nbsp;this._url);
			
			oXHR.setRequestHeader(&quot;Cache-Control&quot;,&nbsp;&quot;no-cache&quot;);
			oXHR.setRequestHeader(&quot;X-Requested-With&quot;,&nbsp;&quot;XMLHttpRequest&quot;);
			oXHR.setRequestHeader(&quot;X-File-Name&quot;,&nbsp;oFile.name);
			
			this._xhr[sKey]&nbsp;=&nbsp;oXHR;
	
			/**
			&nbsp;*&nbsp;파일의&nbsp;업로드가&nbsp;시작될&nbsp;때&nbsp;발생한다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@event&nbsp;uploadStart
			&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(PROGRESS)
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
			&nbsp;*/
			this.fireEvent(&#39;uploadStart&#39;,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;sKey&nbsp;});
			
			var&nbsp;oFormData&nbsp;=&nbsp;new&nbsp;FormData();
			oFormData.append(this.option(&#39;sParamName&#39;),&nbsp;oFile);
			
			oXHR.send(oFormData);
			
			return&nbsp;true;
			
		},
	////////////////////////////////////////////////////////////////////////////////////////////////////////
		
	_addQueue&nbsp;:&nbsp;function(aFiles)&nbsp;{
		
		/**
		&nbsp;*&nbsp;파일&nbsp;선택을&nbsp;완료&nbsp;했을&nbsp;때&nbsp;발생한다.
		&nbsp;*&nbsp;
		&nbsp;*&nbsp;@event&nbsp;beforeSelect
		&nbsp;*&nbsp;@param&nbsp;{Array}&nbsp;aFiles&nbsp;파일&nbsp;목록
		&nbsp;*/
		
		for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0,&nbsp;nLen&nbsp;=&nbsp;aFiles.length;&nbsp;i&nbsp;&lt;&nbsp;nLen;&nbsp;i++)&nbsp;{
			aFiles[i].ext&nbsp;=&nbsp;(/\.([^\.]+)$/.test(aFiles[i].name)&nbsp;&amp;&amp;&nbsp;RegExp.$1)&nbsp;||&nbsp;&#39;&#39;;
		}
		
		if&nbsp;(!this.fireEvent(&#39;beforeSelect&#39;,&nbsp;{&nbsp;aFiles&nbsp;:&nbsp;aFiles&nbsp;}))&nbsp;{&nbsp;return&nbsp;false;&nbsp;}
		
		for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0,&nbsp;nLen&nbsp;=&nbsp;aFiles.length;&nbsp;i&nbsp;&lt;&nbsp;nLen;&nbsp;i++)&nbsp;{
			
			var&nbsp;oFile&nbsp;=&nbsp;aFiles[i];
			var&nbsp;oParam&nbsp;=&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;&#39;UQ&#39;&nbsp;+&nbsp;new&nbsp;Date().getTime()&nbsp;+&nbsp;Math.round(Math.random()&nbsp;*&nbsp;100000)&nbsp;};

			/**
			&nbsp;*&nbsp;파일이&nbsp;목록에&nbsp;추가되기&nbsp;직전에&nbsp;발생한다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@remark&nbsp;여기서&nbsp;파일의&nbsp;고유키를&nbsp;변경하여&nbsp;지정&nbsp;할&nbsp;수&nbsp;있다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@event&nbsp;beforeAdd
			&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@example
			&nbsp;*&nbsp;	o.attach(&#39;beforeAddFile&#39;,&nbsp;function(oCustomEvent)&nbsp;{
			&nbsp;*&nbsp;		oCustomEvent.sKey&nbsp;=&nbsp;&#39;UNIQ&#39;&nbsp;+&nbsp;new&nbsp;Date().getTime()&nbsp;+&nbsp;Math.round(Math.random()&nbsp;*&nbsp;100000);
			&nbsp;*&nbsp;	});
			&nbsp;*/
			if&nbsp;(!this.fireEvent(&#39;beforeAdd&#39;,&nbsp;oParam))&nbsp;{&nbsp;continue;&nbsp;}
			
			var&nbsp;sKey&nbsp;=&nbsp;oParam.sKey;
			
			this._queue.push({
				&#39;key&#39;&nbsp;:&nbsp;oParam.sKey,
				&#39;file&#39;&nbsp;:&nbsp;oFile
			});
			
			oFile.loaded&nbsp;=&nbsp;0;
			oFile.rate&nbsp;=&nbsp;0;
			oFile.state&nbsp;=&nbsp;this._states.NONE;
			
			this._flashFiles&nbsp;&amp;&amp;&nbsp;(this._flashFiles[oParam.sKey]&nbsp;=&nbsp;oFile);
			this._sendForFlash(&#39;setUniqueKeyAt&#39;,&nbsp;[&nbsp;i,&nbsp;sKey&nbsp;]);
			
			/**
			&nbsp;*&nbsp;파일이&nbsp;목록에&nbsp;추가된&nbsp;직후에&nbsp;발생한다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@event&nbsp;add
			&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(NONE)
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
			&nbsp;*/
			this.fireEvent(&#39;add&#39;,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;sKey&nbsp;});
			
		}
		
		return&nbsp;true;
		
	},
	
	_findQueue&nbsp;:&nbsp;function(sKey)&nbsp;{
		
		for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0,&nbsp;nLen&nbsp;=&nbsp;this._queue.length;&nbsp;i&nbsp;&lt;&nbsp;nLen;&nbsp;i++)&nbsp;{
			if&nbsp;(this._queue[i].key&nbsp;===&nbsp;sKey)&nbsp;{&nbsp;return&nbsp;i;&nbsp;}
		}
		
		return&nbsp;-1;
		
	},
	
	/**
	&nbsp;*&nbsp;파일의&nbsp;전체&nbsp;상태&nbsp;정보
	&nbsp;*&nbsp;@method&nbsp;getInfo
	&nbsp;*&nbsp;@return&nbsp;{Object}&nbsp;용량&nbsp;정보
	&nbsp;*&nbsp;		@return&nbsp;{Object}&nbsp;.size&nbsp;파일&nbsp;사이즈&nbsp;정보
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.size.none&nbsp;아무&nbsp;상태도&nbsp;아닌&nbsp;파일의&nbsp;용량&nbsp;합계
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.size.wait&nbsp;업로드&nbsp;대기&nbsp;중인&nbsp;파일의&nbsp;용량&nbsp;합계
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.size.progress&nbsp;업로드&nbsp;진행&nbsp;중인&nbsp;파일의&nbsp;용량&nbsp;합계
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.size.load&nbsp;업로드&nbsp;완료한&nbsp;파일의&nbsp;용량&nbsp;합계
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.size.error&nbsp;업로드&nbsp;에러난&nbsp;파일의&nbsp;용량&nbsp;합계
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.size.total&nbsp;전체&nbsp;파일의&nbsp;용량&nbsp;합계
	&nbsp;*&nbsp;		@return&nbsp;{Object}&nbsp;.count&nbsp;파일&nbsp;갯수&nbsp;정보
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.count.none&nbsp;아무&nbsp;상태도&nbsp;아닌&nbsp;파일의&nbsp;갯수
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.count.wait&nbsp;업로드&nbsp;대기&nbsp;중인&nbsp;파일의&nbsp;갯수
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.count.progress&nbsp;업로드&nbsp;진행&nbsp;중인&nbsp;파일의&nbsp;갯수
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.count.load&nbsp;업로드&nbsp;완료한&nbsp;파일의&nbsp;갯수
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.count.error&nbsp;업로드&nbsp;에러난&nbsp;파일의&nbsp;갯수
	&nbsp;*&nbsp;			@return&nbsp;{Number}&nbsp;.count.total&nbsp;전체&nbsp;파일의&nbsp;갯수
	&nbsp;*/
	getInfo&nbsp;:&nbsp;function()&nbsp;{
		
		var&nbsp;ret&nbsp;=&nbsp;{
			size&nbsp;:&nbsp;{&nbsp;none&nbsp;:&nbsp;0,&nbsp;wait&nbsp;:&nbsp;0,&nbsp;progress&nbsp;:&nbsp;0,&nbsp;load&nbsp;:&nbsp;0,&nbsp;error&nbsp;:&nbsp;0,&nbsp;total&nbsp;:&nbsp;0&nbsp;},
			count&nbsp;:&nbsp;{&nbsp;none&nbsp;:&nbsp;0,&nbsp;wait&nbsp;:&nbsp;0,&nbsp;progress&nbsp;:&nbsp;0,&nbsp;load&nbsp;:&nbsp;0,&nbsp;error&nbsp;:&nbsp;0,&nbsp;total&nbsp;:&nbsp;0&nbsp;}
		};
			
		for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0,&nbsp;len&nbsp;=&nbsp;this._queue.length;&nbsp;i&nbsp;&lt;&nbsp;len;&nbsp;i++)&nbsp;{
			
			var&nbsp;oFile&nbsp;=&nbsp;this._queue[i].file;
			var&nbsp;sState&nbsp;=&nbsp;oFile.state.toLowerCase();
			
			var&nbsp;nSize&nbsp;=&nbsp;oFile.size;
			
			ret.size[sState]&nbsp;+=&nbsp;nSize;
			ret.count[sState]++;

			ret.size.total&nbsp;+=&nbsp;nSize;
			ret.count.total++;
			
		}

		return&nbsp;ret;
		
	},
	
	/**
	&nbsp;*&nbsp;지정한&nbsp;파일&nbsp;또는&nbsp;전체&nbsp;파일을&nbsp;목록에서&nbsp;삭제
	&nbsp;*&nbsp;@method&nbsp;remove
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@syntax
	&nbsp;*&nbsp;@syntax&nbsp;sKey
	&nbsp;*&nbsp;@syntax&nbsp;fpCallback
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일의&nbsp;고유키
	&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;fpCallback&nbsp;원하는&nbsp;파일만&nbsp;삭제&nbsp;할&nbsp;수&nbsp;있도록&nbsp;지정하는&nbsp;필터&nbsp;함수
	&nbsp;*&nbsp;		@param&nbsp;{Object}&nbsp;fpCallback.oFile&nbsp;파일&nbsp;정보&nbsp;
	&nbsp;*
	&nbsp;*&nbsp;@return&nbsp;{Boolean}&nbsp;삭제&nbsp;성공/실패&nbsp;여부
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@example
	&nbsp;*&nbsp;	o.remove(&quot;UNIQ109378183&quot;);&nbsp;//&nbsp;해당&nbsp;고유키를&nbsp;가진&nbsp;파일&nbsp;삭제
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;	o.remove(function(oFile)&nbsp;{&nbsp;//&nbsp;PNG&nbsp;확장자의&nbsp;파일만&nbsp;삭제&nbsp;
	&nbsp;*&nbsp;		return&nbsp;oFile.ext&nbsp;==&nbsp;&#39;png&#39;;
	&nbsp;*&nbsp;	});
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;	o.remove();&nbsp;//&nbsp;모든&nbsp;파일&nbsp;삭제
	&nbsp;*/
	remove&nbsp;:&nbsp;function(sKey)&nbsp;{
		
		var&nbsp;sKeyType&nbsp;=&nbsp;typeof&nbsp;sKey;
		
		switch&nbsp;(sKeyType)&nbsp;{
		case&nbsp;&#39;string&#39;:
			var&nbsp;nIndex&nbsp;=&nbsp;this._findQueue(sKey);
			return&nbsp;this._removeFile(nIndex);
		
		case&nbsp;&#39;function&#39;:
		default:
			for&nbsp;(var&nbsp;i&nbsp;=&nbsp;this._queue.length&nbsp;-&nbsp;1;&nbsp;i&nbsp;&gt;=&nbsp;0;&nbsp;i--)&nbsp;{
				var&nbsp;oProp&nbsp;=&nbsp;this._queue[i];
				if&nbsp;(sKeyType&nbsp;===&nbsp;&#39;function&#39;&nbsp;&amp;&amp;&nbsp;!sKey.call(this,&nbsp;oProp.key,&nbsp;oProp.file))&nbsp;{&nbsp;continue;&nbsp;}
				this._removeFile(i);
			}
		}

		return&nbsp;true;
		
	},
	
	_removeFile&nbsp;:&nbsp;function(nIndex)&nbsp;{
		
		var&nbsp;oProp&nbsp;=&nbsp;this._queue[nIndex];
		if&nbsp;(!oProp)&nbsp;{&nbsp;return&nbsp;false;&nbsp;}
		
		var&nbsp;oFile&nbsp;=&nbsp;oProp.file;
		var&nbsp;sKey&nbsp;=&nbsp;oProp.key;
		
		this._abortFile(nIndex);
		this._queue.splice(nIndex,&nbsp;1);
		
		this._flashFiles&nbsp;&amp;&amp;&nbsp;(delete&nbsp;this._flashFiles[sKey]);

		this._sendForFlash(&#39;remove&#39;,&nbsp;[[sKey]]);
		
		/**
		&nbsp;*&nbsp;파일이&nbsp;목록에서&nbsp;삭제된&nbsp;직후에&nbsp;발생한다.
		&nbsp;*&nbsp;
		&nbsp;*&nbsp;@event&nbsp;remove
		&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태
		&nbsp;*&nbsp;			@param&nbsp;{String}&nbsp;oFile.state.NONE&nbsp;목록에만&nbsp;추가&nbsp;된&nbsp;상태
		&nbsp;*&nbsp;			@param&nbsp;{String}&nbsp;oFile.state.WAIT&nbsp;업로드를&nbsp;위해&nbsp;기다리는&nbsp;상태
		&nbsp;*&nbsp;			@param&nbsp;{String}&nbsp;oFile.state.PROGRESS&nbsp;업로드&nbsp;중인&nbsp;상태
		&nbsp;*&nbsp;			@param&nbsp;{String}&nbsp;oFile.state.LOAD&nbsp;업로드&nbsp;완료&nbsp;된&nbsp;상태
		&nbsp;*&nbsp;			@param&nbsp;{String}&nbsp;oFile.state.ERROR&nbsp;업로드&nbsp;중&nbsp;에러가&nbsp;발생&nbsp;한&nbsp;상태
		&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;sKey&nbsp;파일&nbsp;고유키
		&nbsp;*/
		this.fireEvent(&#39;remove&#39;,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;sKey&nbsp;});
		
		return&nbsp;true;
		
	},
	
	/**
	&nbsp;*&nbsp;지정한&nbsp;파일&nbsp;또는&nbsp;전체&nbsp;파일의&nbsp;업로드&nbsp;중단
	&nbsp;*&nbsp;@method&nbsp;abort
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@syntax
	&nbsp;*&nbsp;@syntax&nbsp;sKey
	&nbsp;*&nbsp;@syntax&nbsp;fpCallback
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일의&nbsp;고유키
	&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;fpCallback&nbsp;원하는&nbsp;파일만&nbsp;업로드&nbsp;중단&nbsp;할&nbsp;수&nbsp;있도록&nbsp;지정하는&nbsp;필터&nbsp;함수
	&nbsp;*&nbsp;		@param&nbsp;{Object}&nbsp;fpCallback.oFile&nbsp;파일&nbsp;정보&nbsp;
	&nbsp;*
	&nbsp;*&nbsp;@return&nbsp;{Boolean}&nbsp;중단&nbsp;성공/실패&nbsp;여부
	&nbsp;*/
	abort&nbsp;:&nbsp;function(sKey)&nbsp;{

		var&nbsp;sKeyType&nbsp;=&nbsp;typeof&nbsp;sKey;
		
		switch&nbsp;(sKeyType)&nbsp;{
		case&nbsp;&#39;string&#39;:
			var&nbsp;nIndex&nbsp;=&nbsp;this._findQueue(sKey);
			return&nbsp;this._abortFile(nIndex);
		
		case&nbsp;&#39;function&#39;:
		default:
			for&nbsp;(var&nbsp;i&nbsp;=&nbsp;this._queue.length&nbsp;-&nbsp;1;&nbsp;i&nbsp;&gt;=&nbsp;0;&nbsp;i--)&nbsp;{
				var&nbsp;oProp&nbsp;=&nbsp;this._queue[i];
				if&nbsp;(sKeyType&nbsp;===&nbsp;&#39;function&#39;&nbsp;&amp;&amp;&nbsp;!sKey.call(this,&nbsp;oProp.key,&nbsp;oProp.file))&nbsp;{&nbsp;continue;&nbsp;}
				this._abortFile(i);
			}
		}
		
		return&nbsp;true;
		
	},
	
	_abortFile&nbsp;:&nbsp;function(nIndex)&nbsp;{
		
		var&nbsp;oProp&nbsp;=&nbsp;this._queue[nIndex];
		if&nbsp;(!oProp)&nbsp;{&nbsp;return&nbsp;false;&nbsp;}
		
		var&nbsp;sKey&nbsp;=&nbsp;oProp.key;
		var&nbsp;oFile&nbsp;=&nbsp;oProp.file;
		
		if&nbsp;(oFile.state&nbsp;!==&nbsp;this._states.WAIT&nbsp;&amp;&amp;&nbsp;oFile.state&nbsp;!==&nbsp;this._states.PROGRESS)&nbsp;{&nbsp;return&nbsp;false;&nbsp;}
		
		if&nbsp;(this._xhr&nbsp;&amp;&amp;&nbsp;this._xhr[sKey])&nbsp;{
			this._xhr[sKey].abort();
		}
		
		this._sendForFlash(&#39;abort&#39;,&nbsp;[[sKey]]);
		this._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;abort&#39;,&nbsp;0,&nbsp;0,&nbsp;this._states.NONE);
		
		return&nbsp;true;
		
	},
		
	/**
	&nbsp;*&nbsp;지정한&nbsp;파일&nbsp;또는&nbsp;전체&nbsp;파일의&nbsp;초기화
	&nbsp;*&nbsp;@method&nbsp;reset
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@syntax
	&nbsp;*&nbsp;@syntax&nbsp;sKey
	&nbsp;*&nbsp;@syntax&nbsp;fpCallback
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일의&nbsp;고유키
	&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;fpCallback&nbsp;원하는&nbsp;파일만&nbsp;초기화&nbsp;할&nbsp;수&nbsp;있도록&nbsp;지정하는&nbsp;필터&nbsp;함수
	&nbsp;*&nbsp;		@param&nbsp;{Object}&nbsp;fpCallback.oFile&nbsp;파일&nbsp;정보&nbsp;
	&nbsp;*
	&nbsp;*&nbsp;@return&nbsp;{Boolean}&nbsp;초기화&nbsp;성공/실패&nbsp;여부
	&nbsp;*/
	reset&nbsp;:&nbsp;function(sKey)&nbsp;{

		var&nbsp;sKeyType&nbsp;=&nbsp;typeof&nbsp;sKey;
		
		switch&nbsp;(sKeyType)&nbsp;{
		case&nbsp;&#39;string&#39;:
			var&nbsp;nIndex&nbsp;=&nbsp;this._findQueue(sKey);
			return&nbsp;this._resetFile(nIndex);
		
		case&nbsp;&#39;function&#39;:
		default:
			for&nbsp;(var&nbsp;i&nbsp;=&nbsp;this._queue.length&nbsp;-&nbsp;1;&nbsp;i&nbsp;&gt;=&nbsp;0;&nbsp;i--)&nbsp;{
				var&nbsp;oProp&nbsp;=&nbsp;this._queue[i];
				if&nbsp;(sKeyType&nbsp;===&nbsp;&#39;function&#39;&nbsp;&amp;&amp;&nbsp;!sKey.call(this,&nbsp;oProp.key,&nbsp;oProp.file))&nbsp;{&nbsp;continue;&nbsp;}
				this._resetFile(i);
			}
		}
		
		return&nbsp;true;
		
	},
	
	_resetFile&nbsp;:&nbsp;function(nIndex)&nbsp;{
		
		var&nbsp;oProp&nbsp;=&nbsp;this._queue[nIndex];
		if&nbsp;(!oProp)&nbsp;{&nbsp;return&nbsp;false;&nbsp;}
		
		var&nbsp;sKey&nbsp;=&nbsp;oProp.key;
		var&nbsp;oFile&nbsp;=&nbsp;oProp.file;
		
		if&nbsp;(oFile.state&nbsp;!==&nbsp;this._states.LOAD&nbsp;&amp;&amp;&nbsp;oFile.state&nbsp;!==&nbsp;this._states.ERROR)&nbsp;{&nbsp;return&nbsp;false;&nbsp;}
		
		oFile.state&nbsp;=&nbsp;this._states.NONE;
		
		/**
		&nbsp;*&nbsp;파일이&nbsp;초기화&nbsp;된&nbsp;직후에&nbsp;발생한다.
		&nbsp;*&nbsp;
		&nbsp;*&nbsp;@event&nbsp;reset
		&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(NONE)
		&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;sKey&nbsp;파일&nbsp;고유키
		&nbsp;*/
		this.fireEvent(&#39;reset&#39;,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;sKey&nbsp;});
		
		return&nbsp;true;
		
	},
		
	/**
	&nbsp;*&nbsp;지정한&nbsp;파일&nbsp;또는&nbsp;전체&nbsp;파일의&nbsp;업로드
	&nbsp;*&nbsp;@method&nbsp;upload
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@syntax
	&nbsp;*&nbsp;@syntax&nbsp;sKey
	&nbsp;*&nbsp;@syntax&nbsp;fpCallback
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일의&nbsp;고유키
	&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;fpCallback&nbsp;원하는&nbsp;파일만&nbsp;업로드&nbsp;할&nbsp;수&nbsp;있도록&nbsp;지정하는&nbsp;필터&nbsp;함수
	&nbsp;*&nbsp;		@param&nbsp;{Object}&nbsp;fpCallback.oFile&nbsp;파일&nbsp;정보&nbsp;
	&nbsp;*&nbsp;			@param&nbsp;{String}&nbsp;fpCallback.oFile.name&nbsp;파일&nbsp;이름
	&nbsp;*&nbsp;			@param&nbsp;{String}&nbsp;fpCallback.oFile.ext&nbsp;파일&nbsp;확장자
	&nbsp;*&nbsp;			@param&nbsp;{Number}&nbsp;fpCallback.oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
	&nbsp;*
	&nbsp;*&nbsp;@return&nbsp;{Boolean}&nbsp;항상&nbsp;true
	&nbsp;*/
	upload&nbsp;:&nbsp;function(sKey)&nbsp;{
		
		var&nbsp;sKeyType&nbsp;=&nbsp;typeof&nbsp;sKey;
		var&nbsp;sOrgKey&nbsp;=&nbsp;sKey;
		
		switch&nbsp;(sKeyType)&nbsp;{
		case&nbsp;&#39;string&#39;:
			sKeyType&nbsp;=&nbsp;&#39;function&#39;;
			sKey&nbsp;=&nbsp;function(_sKey)&nbsp;{&nbsp;return&nbsp;sOrgKey&nbsp;===&nbsp;_sKey;&nbsp;};
			//break;
		
		case&nbsp;&#39;function&#39;:
		default:
			for&nbsp;(var&nbsp;i&nbsp;=&nbsp;this._queue.length&nbsp;-&nbsp;1;&nbsp;i&nbsp;&gt;=&nbsp;0;&nbsp;i--)&nbsp;{
				
				var&nbsp;oProp&nbsp;=&nbsp;this._queue[i];
				
				if&nbsp;(
					(sKeyType&nbsp;===&nbsp;&#39;function&#39;&nbsp;&amp;&amp;&nbsp;!sKey.call(this,&nbsp;oProp.key,&nbsp;oProp.file))&nbsp;||
					oProp.file.state&nbsp;!==&nbsp;this._states.NONE
				)&nbsp;{&nbsp;continue;&nbsp;}

				oProp.file.state&nbsp;=&nbsp;this._states.WAIT;
				
				/**
				&nbsp;*&nbsp;파일이&nbsp;업로드를&nbsp;위한&nbsp;대기를&nbsp;시작했을&nbsp;때&nbsp;발생한다.
				&nbsp;*&nbsp;
				&nbsp;*&nbsp;@event&nbsp;wait
				&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
				&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
				&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
				&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
				&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태&nbsp;(WAIT)
				&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
				&nbsp;*/
				this.fireEvent(&#39;wait&#39;,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oProp.file,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;oProp.key&nbsp;});
				
			}
			
			break;
		}
		
		this._startUploadFile();
		return&nbsp;true;
		
	},
	
	_startUploadFile&nbsp;:&nbsp;function()&nbsp;{
		
		var&nbsp;nParallel&nbsp;=&nbsp;this.option(&#39;nParallel&#39;);
		
		if&nbsp;(this._uploading&nbsp;&gt;=&nbsp;nParallel)&nbsp;{&nbsp;return&nbsp;false;&nbsp;}
		
		var&nbsp;bFinish&nbsp;=&nbsp;true;
		
		for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0,&nbsp;nLen&nbsp;=&nbsp;this._queue.length;&nbsp;i&nbsp;&lt;&nbsp;nLen;&nbsp;i++)&nbsp;{
			
			var&nbsp;oProp&nbsp;=&nbsp;this._queue[i];
			
			if&nbsp;(oProp.file.state&nbsp;===&nbsp;this._states.WAIT)&nbsp;{
				
				bFinish&nbsp;=&nbsp;false;
				
				if&nbsp;(this._uploading&nbsp;&lt;&nbsp;nParallel)&nbsp;{
					this._uploadFile(oProp);
				}
				
			}&nbsp;else&nbsp;if&nbsp;(oProp.file.state&nbsp;===&nbsp;this._states.PROGRESS)&nbsp;{
				
				bFinish&nbsp;=&nbsp;false;
				
			}

		}
		
		return&nbsp;bFinish;
		
	},
	
	_setDoneState&nbsp;:&nbsp;function(sKey,&nbsp;oFile,&nbsp;sEventName,&nbsp;nLoaded,&nbsp;nRate,&nbsp;sState,&nbsp;sLoadResponseText)&nbsp;{
		
		if&nbsp;(oFile.state&nbsp;===&nbsp;sState)&nbsp;{&nbsp;return;&nbsp;}
		
		if&nbsp;(sEventName&nbsp;===&nbsp;&#39;uploadLoad&#39;)&nbsp;{

			/**
			&nbsp;*&nbsp;파일의&nbsp;업로드가&nbsp;완료되기&nbsp;직전에&nbsp;발생한다.
			&nbsp;*&nbsp;
			&nbsp;*&nbsp;@event&nbsp;beforeUploadLoad
			&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
			&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
			&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
			&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sResponseText&nbsp;서버&nbsp;응답&nbsp;문자열
			&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;stop&nbsp;정상적으로&nbsp;업로드&nbsp;되지&nbsp;않았다고&nbsp;판단&nbsp;될&nbsp;때&nbsp;호출
			&nbsp;*/
			if&nbsp;(!this.fireEvent(&#39;beforeUploadLoad&#39;,&nbsp;{
				&#39;oFile&#39;&nbsp;:&nbsp;oFile,
				&#39;sKey&#39;&nbsp;:&nbsp;sKey,
				&#39;sResponseText&#39;&nbsp;:&nbsp;sLoadResponseText
			}))&nbsp;{
				return&nbsp;this._setDoneState(sKey,&nbsp;oFile,&nbsp;&#39;uploadError&#39;,&nbsp;0,&nbsp;0,&nbsp;this._states.ERROR);
			}
			
		}
			
		var&nbsp;bProgressing&nbsp;=&nbsp;oFile.state&nbsp;===&nbsp;this._states.PROGRESS;

		oFile.loaded&nbsp;=&nbsp;nLoaded;
		oFile.rate&nbsp;=&nbsp;nRate;
		oFile.state&nbsp;=&nbsp;sState;
		
		this._xhr&nbsp;&amp;&amp;&nbsp;(delete&nbsp;this._xhr[sKey]);

		this.fireEvent(sEventName,&nbsp;{&nbsp;&#39;oFile&#39;&nbsp;:&nbsp;oFile,&nbsp;&#39;sKey&#39;&nbsp;:&nbsp;sKey&nbsp;});
		if&nbsp;(bProgressing)&nbsp;{&nbsp;this._uploading--;&nbsp;}
		
		var&nbsp;bFinish&nbsp;=&nbsp;this._startUploadFile();

		/**
		&nbsp;*&nbsp;파일의&nbsp;업로드가&nbsp;끝났을&nbsp;때&nbsp;발생한다.
		&nbsp;*&nbsp;
		&nbsp;*&nbsp;@remark&nbsp;어떤&nbsp;상황(정상적인&nbsp;업로드,&nbsp;에러,&nbsp;중단&nbsp;모두&nbsp;포함)으로&nbsp;끝나던&nbsp;무조건&nbsp;발생한다.
		&nbsp;*&nbsp;
		&nbsp;*&nbsp;@event&nbsp;uploadEnd
		&nbsp;*&nbsp;@param&nbsp;{Object}&nbsp;oFile&nbsp;파일&nbsp;정보
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.name&nbsp;파일&nbsp;이름
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.ext&nbsp;파일&nbsp;확장자
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.size&nbsp;파일&nbsp;크기&nbsp;(바이트)
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.loaded&nbsp;업로드&nbsp;된&nbsp;크기&nbsp;(바이트)
		&nbsp;*&nbsp;		@param&nbsp;{Number}&nbsp;oFile.rate&nbsp;업로드&nbsp;된&nbsp;진행률
		&nbsp;*&nbsp;		@param&nbsp;{String}&nbsp;oFile.state&nbsp;현재&nbsp;파일의&nbsp;상태
		&nbsp;*&nbsp;@param&nbsp;{String}&nbsp;sKey&nbsp;파일&nbsp;고유키
		&nbsp;*&nbsp;@param&nbsp;{Boolean}&nbsp;bFinish&nbsp;true&nbsp;인&nbsp;경우&nbsp;더&nbsp;이상&nbsp;업로드&nbsp;할&nbsp;파일이&nbsp;없다는&nbsp;뜻이다.
		&nbsp;*/
		this.fireEvent(&#39;uploadEnd&#39;,&nbsp;{
			&#39;oFile&#39;&nbsp;:&nbsp;oFile,
			&#39;sKey&#39;&nbsp;:&nbsp;sKey,
			&#39;bFinish&#39;&nbsp;:&nbsp;bFinish
		});

	}
	
}).extend(jindo.Component);

jindo.UploadQueue.__flashCallback&nbsp;=&nbsp;{};
</pre>
		</div>
	</div>
</div>

			</div>
		</div>
		<!-- // main content -->

	</div>
	<!-- // container -->

	<!-- footer -->
	<div id="footer">
		<p>Copyright ©<a href="http://nhncorp.com/" target="_blank">NHN Corp.</a> Platform Ajax Team. All Rights Reserved.</p>
	</div>
	<!-- // footer -->

</div>
<!-- // wrap -->

<style type="text/css">

	.item {
		transition:background .2s linear;
		-webkit-transition:background .2s linear;
		-moz-transition:background .2s linear;
		-o-transition:background .2s linear;
		-ms-transition:background .2s linear;
	}
	
	.highlight {
		background-color:#ffffd8 !important;
	}
	
	li.selected a.highlight {
		background-color:#aa8 !important;
	}
	
	.hide-deprecated .deprecated-item, .hide-inherited .inherited-item, .private {
		display:none;
	}
	
	.scrollbar-v, .scrollbar-h { display:none; }
	.scrollbar-show { display:block; }
	
	.api-page .tbl_fold .more_history { display:none; }
	
	/* FILE */
	.file pre.code {
		border:1px solid #ccc;
		padding:0;
	}
	
	.file ol {
		padding-left: 4em;
		background-color: #f9f9f9;
	}

	.file ol li {
		list-style: decimal;
		border-left:1px solid #ccc;
		padding:2px 4px;
	}
	
	.file li.L1, .file li.L3, .file li.L5, .file li.L7, .file li.L9 {
		background-color: #f9f9f9;	
	}

	.file li.L0, .file li.L2, .file li.L4, .file li.L6, .file li.L8 { 
		background-color: #f0f0f0;
	}
	
</style>
<script type="text/javascript" src="../assets/prettify/prettify-min.js"></script>
<script type="text/javascript" src="../assets/hash.js"></script>
<script type="text/javascript" src="../assets/api-list.js"></script>
<script type="text/javascript" src="../assets/api-search.js"></script>
<script type="text/javascript" src="../assets/../api.js?callback=APISearch.setData"></script>
<script type="text/javascript">
	var projectRoot = "../";
	var projectAssets = "../assets";
	
    apiDocs(projectAssets);	
</script>
</body>
</html>